<ion-header>
  <ion-navbar no-border-bottom>
    <ion-title>{{title}}</ion-title>
    <ion-buttons end>
      <button ion-button (click)="save()">保存</button>
    </ion-buttons>
  </ion-navbar>
</ion-header>
<ion-content>
  <ion-list class='gfoa-list'>
    <ion-item>
      <ion-label><span class="required">*</span>沟通类型</ion-label>
      <ion-select cancelText="取消" okText="确定" [(ngModel)]="saveEntity.C_COMMUREC_type_i" [disabled]="isEditData" (ionChange)="selectCommunicateTypeChange()">
        <ion-option value="0">渠道</ion-option>
        <ion-option value="1">机构客户</ion-option>
      </ion-select>
    </ion-item>
    <ion-item>
      <ion-label><span class="required">*</span>沟通时间:</ion-label>
      <ion-datetime displayFormat="YYYY-MM-DD" pickerFormat="YYYY-MM-DD" [(ngModel)]="saveEntity.COMMUTIME_i"
                    cancelText="取消" doneText="确定" max="{{maxDate}}">
      </ion-datetime>
    </ion-item>

    <ion-list *ngIf="saveEntity.C_COMMUREC_type_i == 1">
      <ion-item>
        <!--<ion-label>流程类型:</ion-label>-->
        <ion-row>
          <ion-col width-33>
            <span class="required">*</span>机构客户:
          </ion-col>
          <!--<ion-col>
            <div class="selected-user-list-item break-word">&nbsp;{{pageField.customer_id_i_name}}
            </div>
          </ion-col>-->
          <ion-col text-rigth class='substance'>
            <div>&nbsp;{{pageField.customer_id_i_name}}
            </div>
          </ion-col>
          <ion-col width-20 class="operate" *ngIf="!isEditData">
            <button ion-button small (click)="chooseOrganization()">选择</button>
          </ion-col>
        </ion-row>
      </ion-item>
      <ion-item>
        <ion-label>机构备注:</ion-label>
        <ion-textarea placeholder="请输入机构备注" [(ngModel)]="saveEntity.VC_cus_REMARK_i"></ion-textarea>
      </ion-item>
      <!-- <ion-item>
          <ion-label>拜访人物</ion-label>
          <ion-input placeholder="请输入拜访人姓名" [(ngModel)]="saveEntity.COMMUOBJECTNAME_i"></ion-input>
          <ion-select cancelText="取消" okText="确定" [disabled]="organizationContacts.length <= 0" [(ngModel)]="saveEntity.CONTACTPERid_i">
            <ion-option value="{{contact[1]}}" *ngFor="let contact of organizationContacts">{{contact[2]}}</ion-option>
          </ion-select>
	  </ion-item> -->
	  <!-- 拜访start -->
	  	<!-- <ion-item>
			<ion-label>拜访人物:</ion-label>
			<ion-textarea placeholder="姓名请使用英文逗号隔开" [(ngModel)]="customNames1"></ion-textarea>
		</ion-item>
		<ion-item [hidden]="!saveEntity.customer_id_i">
			<ion-label class="visitor-btn">
				<button>选择</button>
			</ion-label>
			<ion-textarea placeholder="请选择拜访人物姓名" [(ngModel)]="customNames2"></ion-textarea>
		</ion-item> -->
		<ion-row>
			<ion-col col-10>
				<ion-item>
					<ion-label>拜访人物</ion-label>
					<ion-input placeholder="使用英文逗号隔开" [(ngModel)]="saveEntity.COMMUOBJECTNAME_i"></ion-input>
				</ion-item>
			</ion-col>
			<ion-col class="visitor-btn" col-2>
				<button ion-button small [hidden]="!saveEntity.customer_id_i || !organizationContacts || organizationContacts.length === 0" (tap)="chooseVisitor()">选择</button>
			</ion-col>
		</ion-row>
	  <!-- 拜访end -->
      <ion-item>
        <ion-row>
          <ion-col width-33 class='title'>投研支持:</ion-col>
          <ion-col text-rigth class='substance'>
            <div>&nbsp;{{pageField.VC_INV_SUPPORT_i_name}}
            </div>
          </ion-col>
          <ion-col width-20 class="operate">
            <button ion-button small (click)="chooseVC_INV_SUPPORT_i()">选择</button>
          </ion-col>
        </ion-row>
      </ion-item>
    </ion-list>


    <ion-list *ngIf="saveEntity.C_COMMUREC_type_i == 0">
      <ion-item>
        <!--<ion-label>流程类型:</ion-label>-->
        <ion-row>
          <ion-col width-33>
            <span class="required">*</span>渠道名称:
          </ion-col>
          <ion-col class='substance'>
            <div class="break-word">&nbsp;{{pageField.customer_id_i_name}}
            </div>
          </ion-col>
          <ion-col width-20 class="operate" *ngIf="!isEditData">
            <button ion-button small (click)="chooseAgency()">选择</button>
          </ion-col>
        </ion-row>
      </ion-item>
      <ion-item>
        <ion-label>渠道备注:</ion-label>
        <ion-textarea placeholder="请输入渠道备注" [(ngModel)]="saveEntity.VC_cus_REMARK_i"></ion-textarea>
      </ion-item>
      <ion-item>
        <ion-label>拜访人物:</ion-label>
        <!--<ion-select cancelText="取消" okText="确定" [disabled]="agencyContacts.length <= 0" [(ngModel)]="saveEntity.CONTACTPERid_i" (ionChange)="selectAgencyContactsChange()">
          <ion-option value="{{contact[1]}}" *ngFor="let contact of agencyContacts"
          >{{contact[2]}}</ion-option>
        </ion-select>-->
        <ion-input placeholder="请输入拜访人姓名" [(ngModel)]="saveEntity.COMMUOBJECTNAME_i"></ion-input>
      </ion-item>
      <ion-item>
        <!--<ion-row>
          <ion-col width-25 class='title'>联系方式:</ion-col>
          <ion-col class='substance' text-right>{{saveEntity.VC_CONTACT_i}}</ion-col>
        </ion-row>-->
        <ion-label>联系方式:</ion-label>
        <ion-input placeholder="请输入联系方式" [(ngModel)]="saveEntity.VC_CONTACT_i"></ion-input>
      </ion-item>
    </ion-list>


    <ion-item>
      <ion-label><span class="required">*</span>接触方式</ion-label>
      <ion-select cancelText="取消" okText="确定" [disabled]="contactTypeList.length <= 0" [(ngModel)]="saveEntity.COMMUTYPE_i">
        <ion-option *ngFor="let contactType of contactTypeList" value="{{contactType[0]}}">{{contactType[1]}}</ion-option>
      </ion-select>
    </ion-item>
    <ion-item>
      <ion-row>
        <ion-col width-33 class='title'><span class="required">*</span>员工:</ion-col>
        <ion-col text-rigth class='substance'>
          <div>&nbsp;{{pageField.EMPLOYEE_i_name}}
          </div>
        </ion-col>
        <ion-col width-20 class="operate" >
          <button ion-button small (click)="chooseEmp()">选择</button>
        </ion-col>
      </ion-row>
    </ion-item>
    <ion-item *ngIf="saveEntity.C_COMMUREC_type_i == 0">
      <ion-label>培训场次:</ion-label>
      <ion-input type="number" [(ngModel)]="saveEntity.L_TRAIN_NUM_i" ></ion-input>
    </ion-item>
    <ion-item *ngIf="saveEntity.C_COMMUREC_type_i == 0">
      <ion-row>
        <ion-col width-33 class='title'>投研支持:</ion-col>
        <ion-col text-rigth class='substance'>
          <div>&nbsp;{{pageField.VC_INV_SUPPORT_i_name}}
          </div>
        </ion-col>
        <ion-col width-20 class="operate" >
          <button ion-button small (click)="chooseVC_INV_SUPPORT_i()">&nbsp;选择</button>
        </ion-col>
      </ion-row>
    </ion-item>
    <ion-item>
      <ion-label>沟通事由:</ion-label>
      <ion-input placeholder="请输入沟通事由" [(ngModel)]="saveEntity.REASON_i" ></ion-input>
    </ion-item>
    <ion-item>
      <ion-label>沟通内容:</ion-label>
      <ion-textarea rows="5" placeholder="请输入沟通内容" [(ngModel)]="saveEntity.VC_CONTENT_i" ></ion-textarea>
    </ion-item>
    <ion-item *ngIf="saveEntity.C_COMMUREC_type_i == 1">
      <ion-label >机构特点:</ion-label>
      <ion-textarea rows="5" placeholder="请输入机构特点" [(ngModel)]="saveEntity.VC_FEATURE_i" ></ion-textarea>
    </ion-item>
    <ion-item *ngIf="saveEntity.C_COMMUREC_type_i == 0">
      <ion-label>渠道特点:</ion-label>
      <ion-textarea rows="5" placeholder="请输入渠道特点" [(ngModel)]="saveEntity.VC_FEATURE_i" ></ion-textarea>
    </ion-item>
    <ion-item>
      <ion-label>重要项目:</ion-label>
      <ion-textarea rows="5" placeholder="同业重要情报，渠道重要产品及业务需求反馈"
                    [(ngModel)]="saveEntity.VC_IMP_PROJECT_i" ></ion-textarea>
    </ion-item>
    <ion-item>
      <ion-label>备注:&emsp;&emsp;</ion-label>
      <ion-textarea placeholder="请输入沟通备注" [(ngModel)]="saveEntity.REMARK_i"></ion-textarea>
    </ion-item>
  </ion-list>
  <!--<ion-row >
    <ion-col text-center>
      <button block ion-button color="light" (click)="search()"><ion-icon name="create"></ion-icon>编辑</button>
    </ion-col>
  </ion-row>
  <ion-row >
    <ion-col text-center>
      <button block ion-button color="light" (click)="search()"><ion-icon name="checkmark-circle"></ion-icon>保存</button>
    </ion-col>
    <ion-col text-center>
      <button block ion-button color="light" (click)="clear()"><ion-icon name="trash"></ion-icon>取消</button>
    </ion-col>
  </ion-row>-->
</ion-content>
